Integrand size = 24, antiderivative size = 87 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {5 a^2 \sin (c+d x)}{7 d}-\frac {10 a^2 \sin ^3(c+d x)}{21 d}+\frac {a^2 \sin ^5(c+d x)}{7 d}-\frac {2 i \cos ^7(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{7 d} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3577, 2713} \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {a^2 \sin ^5(c+d x)}{7 d}-\frac {10 a^2 \sin ^3(c+d x)}{21 d}+\frac {5 a^2 \sin (c+d x)}{7 d}-\frac {2 i \cos ^7(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{7 d} \]
[In]
[Out]
Rule 2713
Rule 3577
Rubi steps \begin{align*} \text {integral}& = -\frac {2 i \cos ^7(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{7 d}+\frac {1}{7} \left (5 a^2\right ) \int \cos ^5(c+d x) \, dx \\ & = -\frac {2 i \cos ^7(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{7 d}-\frac {\left (5 a^2\right ) \text {Subst}\left (\int \left (1-2 x^2+x^4\right ) \, dx,x,-\sin (c+d x)\right )}{7 d} \\ & = \frac {5 a^2 \sin (c+d x)}{7 d}-\frac {10 a^2 \sin ^3(c+d x)}{21 d}+\frac {a^2 \sin ^5(c+d x)}{7 d}-\frac {2 i \cos ^7(c+d x) \left (a^2+i a^2 \tan (c+d x)\right )}{7 d} \\ \end{align*}
Time = 0.15 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.98 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2 i a^2 \cos ^7(c+d x)}{7 d}+\frac {a^2 \sin (c+d x)}{d}-\frac {4 a^2 \sin ^3(c+d x)}{3 d}+\frac {a^2 \sin ^5(c+d x)}{d}-\frac {2 a^2 \sin ^7(c+d x)}{7 d} \]
[In]
[Out]
Time = 49.18 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.17
method | result | size |
risch | \(-\frac {i a^{2} {\mathrm e}^{7 i \left (d x +c \right )}}{224 d}-\frac {i a^{2} {\mathrm e}^{5 i \left (d x +c \right )}}{32 d}-\frac {5 i a^{2} \cos \left (d x +c \right )}{32 d}+\frac {15 a^{2} \sin \left (d x +c \right )}{32 d}-\frac {3 i a^{2} \cos \left (3 d x +3 c \right )}{32 d}+\frac {11 a^{2} \sin \left (3 d x +3 c \right )}{96 d}\) | \(102\) |
derivativedivides | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {2 i a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{2} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(111\) |
default | \(\frac {-a^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {2 i a^{2} \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{2} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(111\) |
[In]
[Out]
none
Time = 0.23 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.03 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {{\left (-3 i \, a^{2} e^{\left (10 i \, d x + 10 i \, c\right )} - 21 i \, a^{2} e^{\left (8 i \, d x + 8 i \, c\right )} - 70 i \, a^{2} e^{\left (6 i \, d x + 6 i \, c\right )} - 210 i \, a^{2} e^{\left (4 i \, d x + 4 i \, c\right )} + 105 i \, a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + 7 i \, a^{2}\right )} e^{\left (-3 i \, d x - 3 i \, c\right )}}{672 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (76) = 152\).
Time = 0.31 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.74 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=\begin {cases} \frac {\left (- 75497472 i a^{2} d^{5} e^{11 i c} e^{7 i d x} - 528482304 i a^{2} d^{5} e^{9 i c} e^{5 i d x} - 1761607680 i a^{2} d^{5} e^{7 i c} e^{3 i d x} - 5284823040 i a^{2} d^{5} e^{5 i c} e^{i d x} + 2642411520 i a^{2} d^{5} e^{3 i c} e^{- i d x} + 176160768 i a^{2} d^{5} e^{i c} e^{- 3 i d x}\right ) e^{- 4 i c}}{16911433728 d^{6}} & \text {for}\: d^{6} e^{4 i c} \neq 0 \\\frac {x \left (a^{2} e^{10 i c} + 5 a^{2} e^{8 i c} + 10 a^{2} e^{6 i c} + 10 a^{2} e^{4 i c} + 5 a^{2} e^{2 i c} + a^{2}\right ) e^{- 3 i c}}{32} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.13 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {30 i \, a^{2} \cos \left (d x + c\right )^{7} + {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{2} + 3 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{2}}{105 \, d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 641 vs. \(2 (75) = 150\).
Time = 0.67 (sec) , antiderivative size = 641, normalized size of antiderivative = 7.37 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=-\frac {2583 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 5166 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 2583 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) + 2121 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 4242 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) + 2121 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 2583 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 5166 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 2583 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} + 1\right ) - 2121 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 4242 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 2121 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x + i \, c\right )} - 1\right ) - 462 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 924 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) - 462 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 462 \, a^{2} e^{\left (7 i \, d x + 3 i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 924 \, a^{2} e^{\left (5 i \, d x + i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 462 \, a^{2} e^{\left (3 i \, d x - i \, c\right )} \log \left (-i \, e^{\left (i \, d x\right )} + e^{\left (-i \, c\right )}\right ) + 48 i \, a^{2} e^{\left (14 i \, d x + 10 i \, c\right )} + 432 i \, a^{2} e^{\left (12 i \, d x + 8 i \, c\right )} + 1840 i \, a^{2} e^{\left (10 i \, d x + 6 i \, c\right )} + 5936 i \, a^{2} e^{\left (8 i \, d x + 4 i \, c\right )} + 6160 i \, a^{2} e^{\left (6 i \, d x + 2 i \, c\right )} - 1904 i \, a^{2} e^{\left (2 i \, d x - 2 i \, c\right )} - 112 i \, a^{2} e^{\left (4 i \, d x\right )} - 112 i \, a^{2} e^{\left (-4 i \, c\right )}}{10752 \, {\left (d e^{\left (7 i \, d x + 3 i \, c\right )} + 2 \, d e^{\left (5 i \, d x + i \, c\right )} + d e^{\left (3 i \, d x - i \, c\right )}\right )}} \]
[In]
[Out]
Time = 4.10 (sec) , antiderivative size = 256, normalized size of antiderivative = 2.94 \[ \int \cos ^7(c+d x) (a+i a \tan (c+d x))^2 \, dx=\frac {2\,a^2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-2{}\mathrm {i}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {256\,a^2\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\mathrm {i}\right )}{7\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^7}-\frac {8\,a^2\,\left (4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-9{}\mathrm {i}\right )}{3\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^2}-\frac {128\,a^2\,\left (6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-7{}\mathrm {i}\right )}{7\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^6}+\frac {16\,a^2\,\left (8\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-15{}\mathrm {i}\right )}{3\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^3}-\frac {32\,a^2\,\left (22\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-35{}\mathrm {i}\right )}{7\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^4}+\frac {32\,a^2\,\left (31\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-42{}\mathrm {i}\right )}{7\,d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}^5} \]
[In]
[Out]